A subring A of a ring R is called a (two-sided) ideal of R if for every r in R and every a in A both ra and ar are in A.